home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / buzzmachines_massive.exe / Dev / SuperDonut Drumz.cpp < prev   
Encoding:
C/C++ Source or Header  |  2001-08-26  |  17.2 KB  |  631 lines

  1. // Amen
  2. // muhahahahahaha
  3.  
  4. // [:   cyanpjhase
  5. // blakee@rovoscape.com
  6. //
  7.  
  8. #include <string.h>
  9. #include <stdlib.h>
  10. #include <math.h>
  11. #include <float.h>
  12. #include <windows.h>
  13. #include "../MachineInterface.h"
  14. #include "../dsplib/dsplib.h"
  15.  
  16. #include "resource.h" // for zee dialogs
  17.  
  18.  
  19. #pragma optimize ("awy", on)
  20.  
  21.  
  22. //___________________________________________________________________
  23. // 
  24. // Parameters and gruelling machine paperwork starts here
  25. //___________________________________________________________________
  26.  
  27. CMachineParameter const paraTempo = {
  28.     pt_byte,
  29.     "Loop Length",
  30.     "Loop Length",
  31.     1,
  32.     0xFE,
  33.     0xFF,
  34.     MPF_STATE,
  35.     16
  36. };
  37.  
  38. CMachineParameter const paraTrigger = {
  39.     pt_switch,
  40.     "Loop (1 on\\reset, 0 off)",
  41.     "Loop (1 on\\reset, 0 off)",
  42.     -1,
  43.     -1,
  44.     SWITCH_NO,
  45.     0,
  46.     0
  47. };
  48.  
  49. CMachineParameter const paraFTrigger = {
  50.     pt_switch,
  51.     "Filter Trigger",
  52.     "Filter Trigger",
  53.     -1,
  54.     -1,
  55.     SWITCH_NO,
  56.     0,
  57.     0
  58. };
  59.  
  60. CMachineParameter const paraCutoff = {
  61.     pt_byte,
  62.     "F: Cutoff",
  63.     "F: Cutoff",
  64.     1,
  65.     0xFE,
  66.     0xFF,
  67.     MPF_STATE,
  68.     0x7F
  69. };
  70.  
  71. CMachineParameter const paraResonance = {
  72.     pt_byte,
  73.     "F: Resonance",
  74.     "F: Resonance",
  75.     1,
  76.     0xFE,
  77.     0xFF,
  78.     MPF_STATE,
  79.     0x7F
  80. };
  81.  
  82. CMachineParameter const paraEnvMod = {
  83.     pt_byte,
  84.     "F: EnvMod",
  85.     "F: EnvMod",
  86.     1,
  87.     0xFE,
  88.     0xFF,
  89.     MPF_STATE,
  90.     0x7F
  91. };
  92.  
  93. CMachineParameter const paraDecay = {
  94.     pt_byte,
  95.     "F: Decay",
  96.     "F: Decay",
  97.     1,
  98.     0xFE,
  99.     0xFF,
  100.     MPF_STATE,
  101.     0x7F
  102. };
  103.  
  104. CMachineParameter const paraFType = {
  105.     pt_byte,
  106.     "F: Type",
  107.     "F: Type",
  108.     0,
  109.     4,
  110.     0xFF,
  111.     MPF_STATE,
  112.     0
  113. };
  114.  
  115.  
  116. CMachineParameter const *pParameters[] = {
  117.     ¶Trigger,
  118.     ¶FTrigger,
  119.     ¶Tempo,
  120.     ¶Cutoff,
  121.     ¶Resonance,
  122.     ¶EnvMod,
  123.     ¶Decay,
  124.     ¶FType
  125. };
  126.  
  127. CMachineAttribute const *pAttributes[] = { NULL };
  128.  
  129.  
  130. #pragma pack(1)
  131.  
  132. class gvals
  133. {
  134. public:
  135.     byte trig;
  136.     byte ftrig;
  137.     byte tempo;
  138.  
  139.     byte cutoff;
  140.     byte resonance;
  141.     byte envmod;
  142.     byte decay;
  143.     byte ftype;
  144. };
  145.  
  146. #pragma pack()
  147.  
  148. CMachineInfo const MacInfo =
  149. {
  150.  
  151.     MT_GENERATOR,
  152.     MI_VERSION,
  153.     0,
  154.     0,
  155.     0,
  156.     8,
  157.     0,
  158.     pParameters,
  159.     0,
  160.     pAttributes,
  161.     "SuperDonut Ultimate Drum",
  162.     "Amen",
  163.     "Doughnuts and ReBirth",
  164.     "about"
  165. };
  166.  
  167.  
  168. class mi : public CMachineInterface
  169. {
  170. public:
  171.     mi();
  172.     virtual ~mi();
  173.  
  174.     virtual void Tick();
  175.     virtual void Stop();
  176.  
  177.     virtual void Init(CMachineDataInput * const pi);
  178.     virtual bool Work(float *psamples, int numsamples, int const mode);
  179.     virtual char const *DescribeValue(int const param, int const value);
  180.  
  181.     virtual void Command(int const i);
  182.  
  183.     virtual void refilt();
  184.  
  185. public:
  186.     CMachine *ThisMachine;
  187.  
  188.     int icnt;
  189.     int out;
  190.     double looplen;
  191.     double loopn;
  192.     gvals gval;
  193.  
  194.     float current_cutoff;
  195.     float current_resonance;
  196.     float envmod;
  197.     float decay;
  198.     int current_filter;
  199.  
  200.     float coefsTab1[5];
  201.     float ax1,ay1,ax2,ay2;
  202.     float bx1,by1,bx2,by2;
  203.  
  204.     float filtpoint;
  205.     float lcutoff;
  206. };
  207.  
  208. DLL_EXPORTS
  209.  
  210. mi::mi()
  211. {
  212.     GlobalVals = &gval;
  213. }
  214.  
  215. mi::~mi() 
  216. {
  217. }
  218.  
  219. #include "amenshit.h"
  220.  
  221. void mi::refilt() {
  222.     float omega, sn, cs, alpha;
  223.     float a0, a1, a2, b0, b1, b2;
  224.  
  225.     if (lcutoff < 30.0f) { lcutoff = 30.0f; };
  226.     if (lcutoff > 7000.0f) { lcutoff = 7000.0f; };
  227.     switch (current_filter) {
  228.     case 0:
  229.         coefsTab1[0] = 1.0f; coefsTab1[1] = 0.0f; coefsTab1[2] = 0.0f;
  230.         coefsTab1[3] = 0.0f; coefsTab1[4] = 0.0f;
  231.         break;
  232.     case 1: // LPx2
  233.         omega = 2.0f * PI * lcutoff / (pMasterInfo->SamplesPerSec);
  234.         sn = (float)sin ( omega); cs = (float)cos ( omega);
  235.         alpha = sn / (current_resonance / 2.0f);
  236.         b0 = (1.0f - cs) / 2.0f;
  237.         b1 = 1.0f - cs;
  238.         b2 = (1.0f - cs) / 2.0f;
  239.         a0 = 1.0f + alpha;
  240.         a1 = -2.0f * cs;
  241.         a2 = 1.0f - alpha;
  242.         coefsTab1[0] = b0/a0;
  243.         coefsTab1[1] = b1/a0;
  244.         coefsTab1[2] = b2/a0;
  245.         coefsTab1[3] = -a1/a0;
  246.         coefsTab1[4] = -a2/a0;
  247.         break;
  248.     case 2:// HPx2
  249.         omega = 2.0f * PI * lcutoff / (pMasterInfo->SamplesPerSec);
  250.         sn = (float)sin ( omega); cs = (float)cos ( omega);
  251.         alpha = sn / (current_resonance / 2.0f);
  252.         b0 = (1.0f + cs) / 2.0f;
  253.         b1 = -(1.0f + cs);
  254.         b2 = (1.0f + cs) / 2.0f;
  255.         a0 = 1.0f + alpha;
  256.         a1 = -2.0f * cs;
  257.         a2 = 1.0f - alpha;
  258.         coefsTab1[0] = b0/a0;
  259.         coefsTab1[1] = b1/a0;
  260.         coefsTab1[2] = b2/a0;
  261.         coefsTab1[3] = -a1/a0;
  262.         coefsTab1[4] = -a2/a0;
  263.         break;
  264.     case 3: // BPx2
  265.         omega = 2.0f * PI * lcutoff / (pMasterInfo->SamplesPerSec);
  266.         sn = (float)sin ( omega); cs = (float)cos ( omega);
  267.         alpha = sn * sinh((current_resonance / 2.0) * omega / sn);
  268.         b0 = alpha;
  269.         b1 = 0.0f;
  270.         b2 = -alpha;
  271.         a0 = 1.0f + alpha;
  272.         a1 = -2.0f * cs;
  273.         a2 = 1.0f - alpha;
  274.         coefsTab1[0] = b0/a0;
  275.         coefsTab1[1] = b1/a0;
  276.         coefsTab1[2] = b2/a0;
  277.         coefsTab1[3] = -a1/a0;
  278.         coefsTab1[4] = -a2/a0;
  279.         break;
  280.     case 4: // Notchx2
  281.         omega = 2.0f * PI * lcutoff / (pMasterInfo->SamplesPerSec);
  282.         sn = (float)sin ( omega); cs = (float)cos ( omega);
  283.         alpha = sn * sinh( (current_resonance/8.0) * omega / sn);
  284.         b0 = 1.0f;
  285.         b1 = -2.0f * cs;
  286.         b2 = 1.0f;
  287.         a0 = 1.0f + alpha;
  288.         a1 = -2.0f * cs;
  289.         a2 = 1.0f - alpha;
  290.         coefsTab1[0] = b0/a0;
  291.         coefsTab1[1] = b1/a0;
  292.         coefsTab1[2] = b2/a0;
  293.         coefsTab1[3] = -a1/a0;
  294.         coefsTab1[4] = -a2/a0;
  295.         break;
  296.     default:
  297.         break;
  298.     };
  299. };
  300.  
  301.  
  302. void mi::Init(CMachineDataInput * const pi)
  303. {
  304.     // Init code
  305.     ThisMachine = pCB->GetThisMachine();
  306.     loopn = 0.0;
  307.     looplen = 16.0;
  308.     out = 0;
  309.  
  310.     current_cutoff = 11000.0f;
  311.     current_resonance = 13.0f;
  312.  
  313.     lcutoff = 11000.0f;
  314.     icnt = 0;
  315.  
  316.     coefsTab1[0] = 0.0f;
  317.     coefsTab1[1] = 0.0f;
  318.     coefsTab1[2] = 0.0f;
  319.     coefsTab1[3] = 0.0f;
  320.     coefsTab1[4] = 0.0f;
  321.  
  322.     ax1=ay1=ax2=ay2 = 0.0f;
  323.     bx1=by1=bx2=by2 = 0.0f;
  324.  
  325.     envmod = 0;
  326.     decay = 0;
  327.  
  328.     filtpoint = 1.0f;
  329.  
  330.     // copy of mi::Tick here
  331.     if (gval.tempo != 0xFF) { looplen = (double)gval.tempo; };
  332.     if (gval.cutoff != 0xFF) current_cutoff = ((float)gval.cutoff / 254.0f * 8000.0f) + 20.0f;
  333.     if (gval.resonance != 0xFF) current_resonance = ((float)gval.resonance / 254.0f * 25.0f) + 0.5f;
  334.     if (gval.envmod != 0xFF) envmod = ((float)gval.envmod / 254.0f);
  335.     if (gval.decay != 0xFF) decay = (float)((254-gval.decay)+1)/12800.0f;
  336.     if (gval.ftype != 0xFF) current_filter = gval.ftype;
  337. }
  338.  
  339. void mi::Tick()
  340. {
  341.     if (gval.tempo != 0xFF) { looplen = (double)gval.tempo; };
  342.     if (gval.trig != SWITCH_NO) { 
  343.         if (gval.trig == SWITCH_ON) {
  344.             loopn = 0.0;
  345.             out = 1;
  346.         };
  347.         if (gval.trig == SWITCH_OFF) {
  348.             loopn = 0.0;
  349.             out = 0;
  350.         };
  351.     }
  352.     if (gval.ftrig != SWITCH_NO) { 
  353.         if (gval.ftrig == SWITCH_ON) filtpoint = 0.0f;
  354.     }
  355.     if (gval.cutoff != 0xFF) current_cutoff = ((float)gval.cutoff / 254.0f * 8000.0f) + 20.0f;
  356.     if (gval.resonance != 0xFF) current_resonance = ((float)gval.resonance / 254.0f * 25.0f) + 0.5f;
  357.     if (gval.envmod != 0xFF) envmod = ((float)gval.envmod / 254.0f);
  358.     if (gval.decay != 0xFF) decay = (float)((254-gval.decay)+1)/12800.0f;
  359.     if (gval.ftype != 0xFF) current_filter = gval.ftype;
  360. }
  361.  
  362. bool mi::Work(float *psamples, int numsamples, int const mode)
  363. {
  364.     double const ad2i = (1.5 * (1 << 26) * (1 << 26));
  365.     double magicres;
  366.     float curfrac;
  367.     int i, rVal;
  368.     unsigned int ucursamp;
  369.     float forout, xm1, x0, x1, x2, y;
  370.  
  371.     if (out == 0) return false;
  372.  
  373.     double speedstep = ((double)pMasterInfo->BeatsPerMin / 135.0) * ((double)pMasterInfo->TicksPerBeat / 4.0) * (16.0 / looplen);
  374.  
  375.     for (i = 0; i < numsamples; i++){
  376.  
  377.         // basic (CSI) resampler
  378.         magicres = (loopn - 0.5) + ad2i;
  379.         rVal =  *(int *)&magicres;
  380.         ucursamp = (unsigned int)(rVal) + 1u;
  381.         curfrac = (float)(loopn - (double)rVal);
  382.         xm1 = (float)(amen[ucursamp - 1u]);
  383.         x0 = (float)(amen[ucursamp]);
  384.         x1 = (float)(amen[ucursamp + 1u]);
  385.         x2 = (float)(amen[ucursamp + 2u]);
  386.         forout = ((((3.0f * (x0 - x1) - xm1 + x2) * 0.5f * curfrac) + 2.0f * x1 + xm1 - (5.0f * x0 + x2) * 0.5f) * curfrac + (x1 - xm1) * 0.5f) * curfrac + x0;
  387.  
  388.         // Filter Shit (tm)
  389.  
  390.         icnt++;
  391.         if (icnt > 100) {
  392.             filtpoint = filtpoint + decay;
  393.             if (filtpoint > 1.0f) { filtpoint = 1.0f; };
  394.             lcutoff = current_cutoff + (envmod * current_cutoff) - (envmod * (current_cutoff * filtpoint));
  395.             refilt();
  396.             icnt = 0;
  397.         }
  398.  
  399.         y = coefsTab1[0] * forout +
  400.             coefsTab1[1] * ax1 +
  401.             coefsTab1[2] * ax2 +
  402.             coefsTab1[3] * ay1 +
  403.             coefsTab1[4] * ay2;
  404.         ay2 = ay1; ay1 = y; ax2 = ax1; ax1 = forout; forout = y;
  405.         y = coefsTab1[0] * forout +
  406.             coefsTab1[1] * bx1 +
  407.             coefsTab1[2] * bx2 +
  408.             coefsTab1[3] * by1 +
  409.             coefsTab1[4] * by2;
  410.         by2 = by1; by1 = y; bx2 = bx1; bx1 = forout; forout = y;
  411.  
  412.         // output
  413.         *psamples++ = forout;
  414.  
  415.         // step shit
  416.         loopn += speedstep;
  417.         if (loopn > 78387.0f) loopn -= 78387.0f;
  418.     }
  419.  
  420.     return true;
  421. }
  422.  
  423. void mi::Stop()
  424. {
  425.     out = 0;
  426. }
  427.  
  428. char const *mi::DescribeValue(int const param, int const value)
  429. {
  430.     static char txt[16];
  431.  
  432.     switch(param)
  433.     {
  434.     case 0:    // triggers
  435.     case 1:
  436.         return NULL;
  437.         break;
  438.         
  439.     case 2:                
  440.         sprintf(txt, "%i ticks", value);
  441.         return txt;
  442.         break;
  443.  
  444.     case 3:
  445.     case 4:
  446.     case 5:
  447.     case 6:
  448.         sprintf(txt, "%.1f%%", ((float)value / 2.54f));
  449.         return txt;
  450.         break;
  451.     case 7:
  452.         switch (value) {
  453.         case 0: return ("none");
  454.         case 1: return ("24dB LP");
  455.         case 2: return ("24dB HP");
  456.         case 3: return ("BP");
  457.         case 4: return ("Notch");
  458.         default: return NULL;
  459.         }
  460.     default: return NULL;
  461.         break;
  462.     };
  463. }
  464.  
  465.  
  466. HINSTANCE dllInstance;
  467. mi *g_mi;
  468.  
  469. BOOL WINAPI DllMain ( HANDLE hModule, DWORD fwdreason, LPVOID lpReserved )
  470. {
  471.     switch (fwdreason) {
  472.     case DLL_PROCESS_ATTACH:
  473.         dllInstance = (HINSTANCE) hModule;
  474.         break;
  475.  
  476.     case DLL_THREAD_ATTACH:
  477.  
  478.         break;
  479.  
  480.     case DLL_THREAD_DETACH:
  481.         break;
  482.  
  483.     case DLL_PROCESS_DETACH:
  484.         
  485.         break;
  486.     }
  487.     return TRUE;
  488. }
  489.  
  490. BOOL APIENTRY AboutDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
  491.     switch(uMsg) {
  492.     case WM_INITDIALOG:
  493.     {
  494.         char txt[10000];
  495.         
  496.         sprintf (txt, "[01:52] *** sine909 (~sine909@64.165.251.155) has joined #buzz");
  497.         sprintf (txt, "%s\r\n[01:52] <sine909> you are all homo homo",txt);
  498.         sprintf (txt, "%s\r\n[01:52] *** sine909 (~sine909@64.165.251.155) Quit (Client Quit)",txt);
  499.         sprintf (txt, "%s\r\n___________________________________________________________________________",txt);
  500.         sprintf (txt, "%s\r\n",txt);
  501.         sprintf (txt, "%s\r\n   Nick      #   Random Quote ",txt);
  502.         sprintf (txt, "%s\r\n1  bignicca  378 \"clatter: that cant be helped. our whole society is based on resources.\"",txt);
  503.         sprintf (txt, "%s\r\n2  canc3r    314 \"I think its mostly self explanatory\"  ",txt);
  504.         sprintf (txt, "%s\r\n3  cyanpjh   251 \"almost shitiest on earth\"  ",txt);
  505.         sprintf (txt, "%s\r\n4  setzer_   238 \"it 'twas a phat break\"  ",txt);
  506.         sprintf (txt, "%s\r\n5  clatter   141 \"I had a Tandy Colour Computer in 1984 or 5\"  ",txt);
  507.         sprintf (txt, "%s\r\n6  clarion   134 \"Maestro: i'm pretty nifty with networking\"  ",txt);
  508.         sprintf (txt, "%s\r\n7  wiz|coala 131 \"the pop culture is doomed\"  ",txt);
  509.         sprintf (txt, "%s\r\n8  Uksi      117 \"clarion, i went back to nyc for spring break, had tons of stuff to do...\"  ",txt);
  510.         sprintf (txt, "%s\r\n9  djlaser   113 \"canc3r did you checked my last ep\"  ",txt);
  511.         sprintf (txt, "%s\r\n10 Mute      76  \"my first computer was a 8086\"  ",txt);
  512.         sprintf (txt, "%s\r\n11 djboo     72  \"i hope clatter likes it\"  ",txt);
  513.         sprintf (txt, "%s\r\n12 fsm0      64  \"if it was bad, nobody would listen to it\"  ",txt);
  514.         sprintf (txt, "%s\r\n13 Mva       59  \"Boo: how is the Vinyl going?\"  ",txt);
  515.         sprintf (txt, "%s\r\n14 melo      58  \"wish i had a tape recorder or mic for that live show...\"  ",txt);
  516.         sprintf (txt, "%s\r\n15 Bul       58  \"clarakow : say what??\"  ",txt);
  517.         sprintf (txt, "%s\r\n16 MrE\\Bull  56  \"canc3er: Wanna hear sompthing from me ?\"  ",txt);
  518.         sprintf (txt, "%s\r\n17 Belve     54  \"battery is really good\"  ",txt);
  519.         sprintf (txt, "%s\r\n18 soul_man  51  \"im iam good buzz?? haha\"  ",txt);
  520.         sprintf (txt, "%s\r\n19 klaraCow  50  \"CCS took over #audiowarez ? ;)\"  ",txt);
  521.         sprintf (txt, "%s\r\n20 DocBexter 47  \"he said trackers are shit...\"  ",txt);
  522.         sprintf (txt, "%s\r\n21 fhobia    45  \"minibuzz ?\"  ",txt);
  523.         sprintf (txt, "%s\r\n22 MistahE   43  \"He bul what ya gonna do tonight\"  ",txt);
  524.         sprintf (txt, "%s\r\n23 discharge 39  \"klaracow: are you done drilling oskari's holes?\"  ",txt);
  525.         sprintf (txt, "%s\r\n24 boo-pso   37  \"i hopes u likes it :)\"  ",txt);
  526.         sprintf (txt, "%s\r\n25 _phi      35  \"I'd rather go to quadra island and get really stoned\"  ",txt);
  527.         sprintf (txt, "%s\r\n26 |BaRoN1|  33  \"can you recommend on a structure .... like\"  ",txt);
  528.         sprintf (txt, "%s\r\n27 Socrates  28  \"so much work.... so little desire to do it\"  ",txt);
  529.         sprintf (txt, "%s\r\n28 acid1     23  \"i must have talked for about an hour after that question\"  ",txt);
  530.         sprintf (txt, "%s\r\n29 Vectrex   22  \"what's it for rather\"  ",txt);
  531.         sprintf (txt, "%s\r\n30 techrush  22  \"you pig fucking little shit face\"  ",txt);
  532.         sprintf (txt, "%s\r\n31 KarahaNa  22  \"so... where do i get this matlide tracker?\"  ",txt);
  533.         sprintf (txt, "%s\r\n32 SevOPT    20  \"well i'm not makin friends with assholes\"  ",txt);
  534.         sprintf (txt, "%s\r\n33 hwm       20  \"retards can marry & have sex if they aren't minors here now...\"  ",txt);
  535.         sprintf (txt, "%s\r\n",txt);
  536.         sprintf (txt, "%s\r\nChanged  by  New topic ",txt);
  537.         sprintf (txt, "%s\r\n_phi     \"<melo> can i have ops? i want to kick karahana\" ",txt);
  538.         sprintf (txt, "%s\r\nclatter  \"<cyanpjh> ... highway of doom weather\" ",txt);
  539.         sprintf (txt, "%s\r\nclatter  \"she'd get a mouthfull of man bloob\" ",txt);
  540.         sprintf (txt, "%s\r\ncanc3r   \"<klaraCow> oh me stupid ass\" ",txt);
  541.         sprintf (txt, "%s\r\ncyanpjh  \"*** oskari (oskari@dsl-hki2-153.dial.inet.fi) has joined #trax\" ",txt);
  542.         sprintf (txt, "%s\r\nTotal number of topics during the reporting period: 10",txt);
  543.         sprintf (txt, "%s\r\n",txt);
  544.         sprintf (txt, "%s\r\nBig Numbers",txt);
  545.         sprintf (txt, "%s\r\n",txt);
  546.         sprintf (txt, "%s\r\nBelve    couldn't decide whether to stay or go and joined #buzz.20010324 7 times during this reporting period.. ",txt);
  547.         sprintf (txt, "%s\r\n",txt);
  548.         sprintf (txt, "%s\r\nclatter  really wanted others to know what was doing - 8 descriptions alltogether. ",txt);
  549.         sprintf (txt, "%s\r\n   Sample:",txt);
  550.         sprintf (txt, "%s\r\n   [12:36] * clatter wonders if he can DJ mix for 2 hours strait without fumbling a beat ",txt);
  551.         sprintf (txt, "%s\r\n",txt);
  552.         sprintf (txt, "%s\r\nKarahaNa didn't get it on the first time and got kicked out for 4 times... ",txt);
  553.         sprintf (txt, "%s\r\n   Sample: ",txt);
  554.         sprintf (txt, "%s\r\n   [13:11] <KarahaNa> all i asked is a simple question..... and u dumbass dont know how to answer it.... u call ur self an ... ",txt);
  555.         sprintf (txt, "%s\r\n   [13:17] *** KarahaNa was kicked by melo (i love you)  ",txt);
  556.         sprintf (txt, "%s\r\n",txt);
  557.         sprintf (txt, "%s\r\ncanc3r   knew what to say and said \"Kick\" for 4 times. ",txt);
  558.         sprintf (txt, "%s\r\n",txt);
  559.         sprintf (txt, "%s\r\ncyanpjh  gave most ops - actually 14 of them.  ",txt);
  560.         sprintf (txt, "%s\r\n",txt);
  561.         sprintf (txt, "%s\r\nUksi     had many things uncertain - 21% of lines contained a question. ",txt);
  562.         sprintf (txt, "%s\r\n   ..and silver medal goes to wiz|coala - with question ratio of 14%.  ",txt);
  563.         sprintf (txt, "%s\r\n",txt);
  564.         sprintf (txt, "%s\r\nbignicca spoke most monologues - wrote over 5 lines in a row for 9 times..  ",txt);
  565.         sprintf (txt, "%s\r\n",txt);
  566.         sprintf (txt, "%s\r\nUksi     wrote longest lines - average of 43 letters per line. ",txt);
  567.         sprintf (txt, "%s\r\n   Average line length on #buzz.20010324 was 28 letters.  ",txt);
  568.         sprintf (txt, "%s\r\n",txt);
  569.         sprintf (txt, "%s\r\n",txt);
  570.         sprintf (txt, "%s\r\n",txt);
  571.         sprintf (txt, "%s\r\n.:[> > > 303.org/buzz/  ]:.",txt);
  572.         sprintf (txt, "%s\r\n___________________________________________________________________________",txt);
  573.         sprintf (txt, "%s\r\n",txt);
  574.         sprintf (txt, "%s\r\n<Jukashi> hey where can i get some samples for fruityloops? ",txt);
  575.         sprintf (txt, "%s\r\n<+midisax> www'generalmills.com",txt);
  576.         sprintf (txt, "%s\r\n<Jukashi> um",txt);
  577.         sprintf (txt, "%s\r\n<Jukashi> no",txt);
  578.         sprintf (txt, "%s\r\n<+midisax> oh thats lucky charms",txt);
  579.         sprintf (txt, "%s\r\n<+midisax> www.kellogs.com",txt);
  580.         sprintf (txt, "%s\r\n<amr0> yap",txt);
  581.         sprintf (txt, "%s\r\n<Jukashi> :|",txt);
  582.         sprintf (txt, "%s\r\n<+midisax> kelloggs",txt);
  583.         sprintf (txt, "%s\r\n<+midisax> send 20 boxtops to:",txt);
  584.         sprintf (txt, "%s\r\n<+midisax> fruityloops",txt);
  585.         sprintf (txt, "%s\r\n<+midisax> 214623 CR 5 #4",txt);
  586.         sprintf (txt, "%s\r\n<+midisax> battle creek",txt);
  587.         sprintf (txt, "%s\r\n<+midisax> eeeek im being less than a help",txt);
  588.         sprintf (txt, "%s\r\n___________________________________________________________________________",txt);
  589.         sprintf (txt, "%s\r\n",txt);
  590.         sprintf (txt, "%s\r\n",txt);
  591.         sprintf (txt, "%s\r\n",txt);
  592.         sprintf (txt, "%s\r\n.:[the super doughnutz are watching u]:.",txt);
  593.         sprintf (txt, "%s\r\n",txt);
  594.         SetDlgItemText(hDlg,IDC_EDIT1,txt);
  595.  
  596.         return 1;
  597.     }
  598.     case WM_SHOWWINDOW:
  599.         return 1;
  600.     case WM_CLOSE:
  601.         EndDialog (hDlg, TRUE);
  602.  
  603.     case WM_COMMAND:
  604.         switch ( LOWORD (wParam))
  605.         {
  606.         case IDOK:
  607.             EndDialog(hDlg, TRUE);
  608.             return 1;
  609.         default:
  610.             return 0;
  611.         }
  612.         break;
  613.     }
  614.     return 0;
  615. }
  616.  
  617.  
  618. void mi::Command(int const i)
  619. {
  620.     switch (i)
  621.     {
  622.     case 0:
  623.         g_mi=this;
  624.         DialogBox(dllInstance, MAKEINTRESOURCE (IDD_AMENABOUT), GetForegroundWindow(), (DLGPROC) &AboutDialog);
  625.  
  626.         break;
  627.     default:
  628.         break;
  629.     }
  630. }
  631.